;; =============================================================================
;; parser unit tests


#|

(progn
  (setf ctx (create-context))

  (toplev-parse-list ctx '((test dump-type uint)))

  ;; dump type
  (toplev-parse-list ctx '((type unsigned long Temperature)
			   (test dump-type Temperature)
			   (test undefine-type Temperature)))

  ;; dump all types
  (toplev-parse-list ctx '((test dump-all-types)))

  ;; test that type is defined
  (toplev-parse-list ctx '((test type-defined uint)))

  ;; test that type is undefined
  (toplev-parse-list ctx '((test type-undefined UnitType)))

  (toplev-parse-list ctx '(
			   (type unsigned long UnitType)
			   (test type-defined UnitType)
			   (test undefine-type UnitType)
			   (test type-undefined UnitType)))

  ;; proxy type check
  (toplev-parse-list ctx '((type UnkUnitType)
			   (test type-defined UnkUnitType)
			   ;; (test dump-type UnkUnitType)
			   (test dump-all-types)
			   (test undefine-type UnkUnitType)
			   (test type-undefined UnkUnitType)))

  ;; constraints
  (toplev-parse-list ctx '((constraint (is Temperature pointer)))))

;; functions
(progn
  (toplev-parse-list ctx '((type Key)
			   (test dump-type Key)))

  ;; end
  )
|#
